define(["jquery","cookie"],function(){
	$(function(){
		$.get("/html/include/footer.html",function(data){
			$("footer").html(data);

			//dom 加载购物商品数量
		$.cookie.json = true;
		const products = $.cookie("products");
		const totalAmount = products.reduce(function(sum,curr){
					return sum += curr.amount;
				},0);
				$(".cart").text(totalAmount);
				$(".mycart").text(totalAmount);
		})
	})
})